﻿@model SuperJ.CMS.ViewModels.AnnounceViewModel
@{
    Layout = null;
}
<div id="pageTitle" style="display:none;">发布公告</div>

@using (Ajax.BeginForm(new AjaxOptions
{
    HttpMethod = "post",
    
    
    UpdateTargetId =ViewBag.PanelId,
    InsertionMode = InsertionMode.Replace,
    LoadingElementId = "procing",
}))
{
        @Html.ValidationSummary(true)
    <fieldset>
        <legend><a href="javascript:void(0)" onclick="javascript:$(this).parent().next().toggle();">帮助</a></legend>
        <ul style="display:none;">
            <li>1</li>
            <li>2</li>
            <li>3</li>
        </ul>
    </fieldset>
    <fieldset>
        <legend>表单填写</legend>
        @Html.Hidden("panel")
        <div class="editor">
        
            @Html.LabelFor(model => model.Title, "公告标题")
            @*Html.DropDownListFor(m => m.TitleColor, (SelectList)ViewData["TitleColor"]);*@
            
            @Html.EditorFor(model => model.Title)
            @*Html.ValidationMessageFor(model => model.TitleColor)*@
            @Html.ValidationMessageFor(model => model.Title)
          
        </div>
        <div class="editor">
            @Html.LabelFor(model => model.LinkUrl, "外部链接")
            @Html.TextBoxFor(model => model.LinkUrl, new { style = "width:300px" })
            @Html.ValidationMessageFor(model => model.LinkUrl)
            </div>
        <div class="editor">
            @Html.LabelFor(model => model.FullContent, "公告内容")
            @Html.TextAreaFor(model => model.FullContent, new {  rows = "12", cols = "80", style = "width: 80%" })
            @Html.ValidationMessageFor(model => model.Readme)
           
        </div>
        <div class="editor">
            @Html.LabelFor(model => model.IsPass, "是否立即发布")
            @Html.EditorFor(model => model.IsPass)
            @Html.ValidationMessageFor(model => model.IsPass)
        </div>
        <div class="editor">
            @Html.LabelFor(model => model.CreateTime, "公告创建时间")
            @Html.TextBoxFor(model => model.CreateTime, new { disabled = "disabled", style = "background:#DDD;border:1px solid #DDD" })
            @Html.ValidationMessageFor(model => model.CreateTime)
        </div>
        
        <p>
            <input class="formSubmit" type="submit" value="确定" /> <input class="formCancel" type="reset" name="reset" value="取消" />
        </p>
    </fieldset>
} 


<script type="text/javascript">
    $(function () {
        //$("#Readme").xheditor(false);
        //$("#Readme").xheditor();
        //$("#@ViewBag.PanelId #Readme").xheditor();
        //$("#@ViewBag.PanelId #EndDate").datepicker();
        //$("#@ViewBag.PanelId #PublishDate").datepicker();
        //        $('#PublishTime').timepicker();
        //        $("#EndTime").timepicker();
        //$("#@ViewBag.PanelId .formSubmit").button();
        //$("#@ViewBag.PanelId .formCancel").button();
        //$("#@ViewBag.PanelId #Title")[0].focus();
        var tc = @(ViewBag.TabCounter);
        

    });
</script>
<input id="a@(ViewBag.TabCounter)" class="formSubmit" type="submit" value="确定" />